#pragma once

#include <string>

namespace mswin {

typedef std::string string;

/// Produces series of names that differes only in sequentional number:
/// a_1.ext, a_2.ext, a_3.ext, ...
/// May take pattern with substring '[###]' that disignates where a number should be placed
class seq_name_factory {
public:
	seq_name_factory(string const & pattern = string());
	void init(string const & pattern);
	void set_current(int v) { current_ = v; }
	string get_next();
	static string propose_pattern(string const & name);
private:
	//output name is composed by the rule: prefix_ + current_ (min length digits_) + suffix_
	string prefix_, suffix_;
	int current_;
	int digits_;
};

} //namespace irender
